#ifndef     __HANDLER_TASK_H
#define     __HANDLER_TASK_H

#include "../rtos/thread.h"
#include "../rtos/message_queue.h"
#include "../conn/frame.h"
#include "../pub_task/task_info.h"

namespace heat_task {

class HandlerTask : public rtos::Thread<HandlerTask, 2048, osPriorityHigh1> {

public:
    void init_start();
    inline void post(const conn::Frame &frame) { m_mq.post(frame); }

    void run();

    TaskInfo task_info;

private:
    rtos::lazy::MessageQueue<conn::Frame, 10> m_mq;
};

extern HandlerTask handlerTask;

}

#endif
